Skip to content

feat(composer): improve quick panel search aliases#16730

Merged
0xfullex merged 3 commits into
CherryHQ:mainfrom
ousugo:feat-composer-quick-panel-search
Jul 6, 2026
Merged

feat(composer): improve quick panel search aliases#16730
0xfullex merged 3 commits into
CherryHQ:mainfrom
ousugo:feat-composer-quick-panel-search

Conversation

@ousugo

@ousugo ousugo commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

🚨 Branch strategy — read before opening this PR

The v2 refactor has merged into main, so main is the default branch for active development (v1 and v2 code currently coexist there — expect large, breaking changes).

  • Active development (features, refactors, optimizations, fixes for the current codebase) → target main (the default base).
  • v1 maintenance (hotfixes and subsequent v1 releases) → branch from and target v1, not main.

A v1 fix does not auto-carry to main: if the same bug exists on main, open a separate forward-port PR targeting main. Before touching subsystems being replaced, read docs/references/data/ and watch for @deprecated markers — they flag code being deleted.

What this PR does

  • In localized Composer quick panels, root actions and tools could be difficult to find with their English names.
  • Composer root panel rows containing Chinese text supported pinyin text matching, but not pinyin-initial matching.
  • Hidden English search aliases were not propagated through the Composer quick panel item pipeline.

After this PR:

  • Composer quick panel items can define hidden searchAliases that participate in filtering without changing rendered labels.
  • Built-in Composer tools and leading root actions include English aliases so they remain searchable by English names in any UI locale.
  • Composer root panel matching supports pinyin initials whenever the searchable text contains Chinese, while preserving scoped filterText behavior for items such as agent skills.
PixPin_2026-07-04_06-10-11.mp4

Fixes # N/A

Why we need it and why it was done in this way

The following tradeoffs were made:

  • searchAliases are hidden metadata instead of rendered text, so the UI remains localized while search accepts English names across locales.
  • Composer root-panel custom filtering keeps filterText authoritative and only expands it with hidden aliases, avoiding accidental broadening of agent skill searches.
  • The change is scoped to existing quick panel item plumbing and built-in Composer actions instead of introducing a new registry abstraction.

The following alternatives were considered:

  • Making Composer filtering fully additive for all items was considered, but rejected because it widened search behavior for non-target items such as agent skills.
  • Refactoring leading new-chat/new-task items into a shared registration path was considered, but deferred in favor of the smallest behavior fix.

Links to places where the discussion took place: N/A

Breaking changes

None.

If this PR introduces breaking changes, please describe the changes and the impact on users.

N/A

Special notes for your reviewer

Validation run locally:

  • vitest run --project renderer src/renderer/components/composer/variants/__tests__/ChatComposer.test.tsx src/renderer/components/composer/variants/__tests__/AgentComposer.test.tsx — 125 tests passed.
  • vitest run --project renderer on focused QuickPanel and Composer tool test files — 39 tests passed.
  • pnpm typecheck:web passed.
  • biome check on touched files passed.
  • git diff --check passed.
  • /gh-pr-review was run in report-only mode; follow-up findings were addressed.

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

  • Branch: This PR targets the correct branch — main for active development, v1 for v1 maintenance fixes
  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required
  • Documentation: A user-guide update was considered and is present (link) or not required. Check this only when the PR introduces or changes a user-facing feature or behavior.
  • Self-review: I have reviewed my own code (e.g., via /gh-pr-review, gh pr diff, or GitHub UI) before requesting review from others

Release note

Improve Composer quick panel search so localized UI can match English tool names, with pinyin-initial matching for Chinese labels.

@ousugo ousugo requested a review from a team July 3, 2026 22:03
@ousugo ousugo marked this pull request as draft July 3, 2026 22:04
@ousugo ousugo marked this pull request as ready for review July 3, 2026 22:12
@ousugo ousugo force-pushed the feat-composer-quick-panel-search branch from 6c16708 to 2c44b20 Compare July 4, 2026 11:41
Signed-off-by: ousugo <dkzyxh@gmail.com>
@ousugo ousugo force-pushed the feat-composer-quick-panel-search branch from 2c44b20 to 0ca4fa4 Compare July 6, 2026 09:39

@eeee0717 eeee0717 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No substantive issues found.

CI checked via GitHub: required visible checks are passing; skipped jobs are not attributable PR failures. Local pnpm lint/test/format not run per repository review instructions.

@kangfenmao kangfenmao left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No substantive issues found in the current head.\n\nRechecked before approval: head is 9dcb483, visible CI is passing/skipped, and there are no unresolved non-outdated review threads. Local pnpm lint/test/format not run per repository review instructions.

@ousugo ousugo added the ready-to-merge This PR has sufficient reviewer approvals but is awaiting code owner approval. label Jul 6, 2026
@0xfullex 0xfullex merged commit 8c51eec into CherryHQ:main Jul 6, 2026
7 checks passed
@ousugo ousugo deleted the feat-composer-quick-panel-search branch July 6, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has sufficient reviewer approvals but is awaiting code owner approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants